const consts = {
    keyToken: 'mx-token',
    keyUserInfo: 'mx-userInfo',
    keyAppConfig: 'mx-appConfig',
    keyCacheUniquePrefix: 'mx-transfer-cache-',
    keyTheme: 'mx-theme',
    propAppConfig: 'appConfig',
    routes: {
        index: {url: '/pages/index/index', type: 'tab'},
        login: '/pages/login/login',
        activate: '/pages/activate/activate'
    },
    serverErrors: {
        400: '请求无效 (Bad request)',
        401: '操作未授权，请登陆',
        402: '登陆凭据失效，请重新登陆',
        403: '没有权限访问',
        404: '请求资源不存在',
        405: '权限不足，请开通VIP'
    }
}

export function getTabRoutes() {
    return Object.values(consts.routes)
        .filter(r => r.type == 'tab')
        .map(r => r.url)
}

export default consts
